package com.egene.tw.data.net;

import com.egene.tw.data.entity.NetResult;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Created by wzx on 16/12/18.
 */

public interface RemoteApi {

    ///////////////////////////////////////////////////////////////////////////
    //
    ///////////////////////////////////////////////////////////////////////////
//    http://103.17.9.110:9100/api/APPService.ashx?cmd=ServerHandler.SaveStepInfo&userid=ab66f047f73341448f6d1351826e97aa&device=IOS&stepnumber=1200&date=2018-03-15 14:06
    @GET("/api/APPService.ashx")
    Observable<NetResult> step(
            @Query("cmd") String cmd
            , @Query("userid") String userid
            , @Query("device") String device
            , @Query("stepnumber") int stepnumber
            , @Query("date") String date);


    @GET("/api/APPService.ashx")
    Observable<NetResult> sleep(
            @Query("cmd") String cmd
            , @Query("userid") String userid
            , @Query("device") String device
            , @Query("sleephour") int sleephour
            , @Query("deepsleeptime") int deepsleeptime
            , @Query("shallowsleeptime") int shallowsleeptime
            , @Query("walkingtimes") int walkingtimes
            , @Query("date") String date);


    @GET("/api/APPService.ashx")
    Observable<NetResult> heart(
            @Query("cmd") String cmd
            , @Query("userid") String userid
            , @Query("device") String device
            , @Query("heartrate") int heartrate
            , @Query("date") String date);


    @GET("/api/APPService.ashx")
    Observable<NetResult> blood(
            @Query("cmd") String cmd
            , @Query("userid") String userid
            , @Query("device") String device
            , @Query("systolic") int systolic
            , @Query("diastolic") int diastolic
            , @Query("date") String date);


    @GET("/api/APPService.ashx")
    Observable<NetResult> oxygen(
            @Query("cmd") String cmd
            , @Query("userid") String userid
            , @Query("device") String device
            , @Query("bloodox") int bloodox
            , @Query("date") String date);

    @GET("/api/APPService.ashx")
    Observable<NetResult> fatigue(
            @Query("cmd") String cmd
            , @Query("userid") String userid
            , @Query("device") String device
            , @Query("fatigue") float fatigue
            , @Query("date") String date);
}